import request from '@/utils/request'

export function changeRadarStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/equipment/radar/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询雷达信息列表
export function listRadar(query) {
  return request({
    url: '/equipment/radar/list',
    method: 'get',
    params: query
  })
}

// 查询雷达信息详细
export function getRadar(id) {
  return request({
    url: '/equipment/radar/' + id,
    method: 'get'
  })
}

// 新增雷达信息
export function addRadar(data) {
  return request({
    url: '/equipment/radar',
    method: 'post',
    data: data
  })
}

// 修改雷达信息
export function updateRadar(data) {
  return request({
    url: '/equipment/radar',
    method: 'put',
    data: data
  })
}

// 删除雷达信息
export function delRadar(id) {
  return request({
    url: '/equipment/radar/' + id,
    method: 'delete'
  })
}
